import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-11-29
 * Time: 17:41
 */
public class Demo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()) {
            int count = 0;
            int n = scan.nextInt();
            if(n == 0) break;
            while(n > 1) {
                n = (int)Math.ceil((double)n/3);
                count++;
            }

            System.out.println(count);
        }
    }
}
